package com.hzlh.controller.pc;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hzlh.model.TPcFinancingHistory;
import com.hzlh.service.TPcFinancingHistoryService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * (TPcFinancingHistory)表控制层
 *
 * @author makejava
 * @since 2021-06-10 09:48:50
 */
@RestController
@RequestMapping("/tPcFinancingHistory")
public class TPcFinancingHistoryController {
    /**
     * 服务对象
     */
    @Resource
    private TPcFinancingHistoryService tPcFinancingHistoryService;

    /**
     * 查询企业融资历史列表
     * @param pageIndex
     * @param pageSize
     * @return
     */
    @GetMapping("/getList")
    public PageInfo getList(@RequestParam(value = "pageIndex", defaultValue = "1", required = false) Integer pageIndex,
                            @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize) {
        PageHelper.startPage(pageIndex, pageSize);
        List<TPcFinancingHistory> list = tPcFinancingHistoryService.selectList(null);
        return new PageInfo<>(list);
    }

    @GetMapping("/test")
    public Object test() {
        return tPcFinancingHistoryService.test();
    }
}
